package patterns.command;

/**
 * Created by lenovo on 2016/11/30 0030.
 * 演示，
 */
public class CommandPatternDemo {
    public static void main(String[] args) {

        Stock abcStock = new Stock();

        BuyStock buyStock = new BuyStock(abcStock);
        SellStock sellStock = new SellStock(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrders();
    }
}
